package edu.dayu.responsibility;

import java.util.Objects;

public class Manager implements BudgeHandler {
    private BudgeHandler nextHandler;

    @Override
    public void setNextHandler(BudgeHandler nextHandler) {
        this.nextHandler = nextHandler;
    }

    @Override
    public boolean handle(int amount) {
        if(amount<5000){
            System.out.println("小于5000块，我这个经理可以决定：同意！");
            return true;
        }
        System.out.println(String.format("%d超出Manager权限,自己想办法",amount));
        return false;
    }
}
